package com.woniuxy.huayoung.converton;

import com.woniuxy.huayoung.result.ResponseResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author dushen
 * @className: Exception
 * @description: TODO 类描述
 * @create 2021-07-19-14:31
 */
@RestControllerAdvice
public class OverallException {

    @ExceptionHandler(Exception.class)
    public ResponseResult<Object> exception(Exception e) throws Exception {
        throw e;
//        return new ResponseResult<>().setCode(500).setMessage("服务出错").setData(null);
    }
}
